package com.yangyang.dao;

import com.yangyang.entity.Order;
import com.yangyang.entity.QueryVo;
import com.yangyang.entity.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderDao {

    /**
     * 登录
     * @param user
     * @return
     */
    @Select("select * from tb_user where username = #{username} and password = #{password}")
    User getUser(User user);

    /**
     * 列表展示
     * @param vo
     * @return
     */
    List<Order> list(QueryVo vo);

    /**
     * 添加
     * @param order
     * @return
     */
    int add(Order order);

    @Select("select * from tb_order")
    List<Order> getlist();
}
